package com.farina.tracescleaner;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;


public class AutoStart extends BroadcastReceiver 
{
    public void onReceive(Context arg0, Intent arg1) 
    {
       SharedPreferences settings = arg0.getSharedPreferences(MainActivity.STARTUP_DATA, 0);
	   boolean isActive = settings.getBoolean("isActive", false);
	   if(isActive){
		   MainActivity.controlIntent=new Intent(arg0, ControlService.class);
		   arg0.startService(MainActivity.controlIntent);
		   ControlService.service=arg0;
	   }
    }
}